<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="template.xhtml" >        
        <ui:define name="content" >
            <!--            <h:form>
                            <h:commandButton id="cb1" value="list problems by process" action="#{listProblemsController.listProblemsByProcess()}"/>
                        </h:form>-->
            <table id="table1" style="border: 1pt #000000; " >
                <tr><td>title</td><td>description</td><td>product</td><td>created by   </td><td>state</td><td>operation</td>
                </tr>
                <ui:repeat var="p" value="#{listProblemsController.temp1}" varStatus="status">
                    <tr>
                        <td>#{p.title}</td><td>#{p.description}</td><td>#{p.productinvolve.title}
                        </td><td>#{p.creator.userName}</td><td>#{p.state}</td>
                        <td>
                            <!--                                                        <h:form>
                                                                                        <h:commandLink rendered="#{p.state != 'Solved'}" value="change"  >
                                                                                            <f:param name="problemId" value="#{p.id}"/>
                                                                                        </h:commandLink>
                                                                                    </h:form>-->
                            <h:link rendered="#{p.state != 'Solved'}" value="change" outcome="changeProblemState.xhtml?problemId=#{p.id}">
                            <!--                                <f:param name="problemId" value="#{p.id}"/>-->

                            </h:link>
                        </td>
                    </tr>
                </ui:repeat>
            </table>

        </ui:define>
    </ui:composition>
</html>


